<!--#include file="inc/AspCms_SettingClass.asp" -->
<%CheckLogin()%>
<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>Home</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />
<link href="css/timoo/uikit.min.css" rel="stylesheet">
<link href="css/timoo/timoo.css" rel="stylesheet">
<script src="js/timoo/jquery.min.js"></script>
<script src="js/timoo/uikit.min.js"></script>
<script src="js/timoo/uikit-icons.min.js"></script>
<script src="js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section home">
            <div class="title">后台导航</div>
            <div class="content">
                <%
                    dim rs,subrs,sql
                    
                    if session("GroupMenu")="all" then
	                    sql="select MenuID, MenuName, MenuLink, (select Count(*) from {prefix}Menu as b where MenuStatus=1 and b.ParentID=a.MenuID ) from {prefix}Menu as a where MenuStatus=1 and ParentID=0 order by MenuOrder"
                    else
	                    sql="select MenuID, MenuName, MenuLink, (select Count(*) from {prefix}Menu as b where MenuStatus=1 and b.ParentID=a.MenuID ) from {prefix}Menu as a where MenuStatus=1 and ParentID=0 and MenuID in("&session("GroupMenu")&") order by MenuOrder"
                    end if

                    set rs = conn.exec(sql,"r1")
                    do while not rs.eof 
                %>
                <div class="list" uk-grid>
                    <div class="uk-width-1-6 left">
                        <div class="box"><%=rs(1)%></div>
                    </div>
                    <div class="uk-width-5-6 right">
                        <div class="box">
                            <ul class="uk-clearfix">
                                <li class="uk-float-left subject">
                                    <a href="menu.asp?id=<%=rs(0)%>" target="menu">[<%=rs(1)%>]</a>
                                </li>
                                <%
                                    if session("GroupMenu")="all" then
	                                    sql="select MenuID, MenuName, MenuLink from {prefix}Menu where MenuStatus=1 and ParentID="&rs(0)&" order by MenuOrder"
                                    else
	                                    sql="select MenuID, MenuName, MenuLink from {prefix}Menu where MenuStatus=1 and ParentID="&rs(0)&" and MenuID in("&session("GroupMenu")&")"&" order by MenuOrder"
                                    end if
                                    
		                            set subrs=conn.exec(sql,"r1")
		                            do while not subrs.eof	
			                    %>
                                <li class="uk-float-left">
                                    <a href="<%=subrs(2)%>"><%=subrs(1)%></a>
                                </li>
                                <%
			                        subrs.moveNext
		                            loop	
		                        %>
                            </ul>
                        </div>
                    </div>
                </div>
                <%
	                rs.moveNext
                    loop
                %>
            </div>
        </div>
    </div>
</div>
</body>
</html>